import type { DescriptionsProps } from "antd";

const getDetailItems = (record): DescriptionsProps["items"] => {
  return [
    {
      key: "1",
      label: "姓名",
      children: <p>{record.name}</p>,

    },
    {
      key: "2",
      label: "年龄",
      children: <p>{record.age}</p>,
    },
    {
      key: "3",
      label: "性别",
      children: <p> {record.sex === 1 ? "男" : "女"}</p>,
    },
    {
      key: "4",
      label: "电话",
      children: <p>{record.mobile}</p>,
    },
    {
      key: "5",
      label: "地址",
      children: <p>{record.address}</p>,
    },
    {
      key: "5",
      label: "标签",
      children: <p>{record.tags?.join(", ")}</p>,
    },
  ];
};

export { getDetailItems };
